package com.cx.api;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.cx.entity.user.MemberUserEntity;
import com.cx.service.MemberUserService;
import com.cx.utils.page.Page;
import com.cx.utils.rps.RequestParameters;

@Component(value="memberUserApiImpl")
public class MemberUserApiImpl implements MemberUserApi{

	@Autowired
	private MemberUserService memberUserService;
	
	@Override
	public void addUser(MemberUserEntity memberUser) {
		memberUserService.addUser(memberUser);
	}

	@Override
	public void updateUser(MemberUserEntity memberUserEntity) {
		memberUserService.updateUser(memberUserEntity);
	}

	@Override
	public MemberUserEntity getUser(String uuid) {
		return memberUserService.getUser(uuid);
	}

	@Override
	public Page<MemberUserEntity> getUsersByPage(RequestParameters rps, int limit, int pageNo) {
		return memberUserService.getUsersByPage(rps,limit,pageNo);
	}

	@Override
	public MemberUserEntity getUser(RequestParameters rps) {
		return memberUserService.getUser(rps);
	}

	@Override
	public List<MemberUserEntity> getUserList(RequestParameters rps) {
		return memberUserService.getUsers(rps);
	}
}
